<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>打印页</title>
	<script src="__JS__/jquery.min.js?v={:C('TKE_VERSION')}"></script>
    <script src="__STATIC__/PrintArea-master/js/jquery.printarea.js"></script>
    <script src="__STATIC__/aui-artDialog-9fd667e/dist/dialog.js"></script>
    <link rel="stylesheet" href="__STATIC__/aui-artDialog-9fd667e/css/ui-dialog.css">
	<link rel="stylesheet" href="__CSS__/print.css">
</head>
<body>
    <div id="j-pager" class="g-paper">
        <div class="header">
            <h1>家家户户网家博会线上付款凭证</h1>
        </div>
        <div class="body">
            <p>线上订单号：{$order_info.order_id|paperOrderPad}</p>
            <p>纸质订单号：{:paperOrderPad(I('paper_order'))}</p>
            <p>支付方式：{$order_info.pay_type|get_pay_title}</p>
            <p>打印时间：{:time_format(NOW_TIME)}</p>
            <if condition="$order_info['customer_name']"><p>客户姓名：{$order_info.customer_name}</p></if>
            <p>联系电话：{$order_info.customer_id|getCustomerName}</p>
            <p>商户：{$order_info.merchant_id|getMerchantName}</p>
            <if condition="$order_info['merchant_address'] neq ''"><p>商户地址：{$order_info.merchant_address}</p></if>
            <if condition="$order_info['merchant_fixed_phone'] neq ''"><p>商户电话：{$order_info.merchant_fixed_phone}</p></if>
            <p>店铺：{$order_info.shop_id|getShopName}</p>
            <p>品类：{$order_info.conf_category_id|getConfCategoryName}</p>
            <if condition="$order_snap neq null">
	            <p>所购商品：{$order_snap.goods_name}</p>
	            <p>{$order_snap.goods_title}</p>
	            <p>{$order_snap.goods_introduction}</p>
	            <p>市场价：{$order_snap.market_price}</p>
	            <p>商城价：{$order_snap.shop_price}</p>
	            <p>促销价：{$order_snap.promotion_price}</p>
	            <p>定金：{$order_snap.goods_deposit}</p>
            </if>
            <p>支付金额：{$order_info.order_amount}</p>
            <p>凭证识别码：{$order_info.check_code}</p>
            <h2>注意事项：</h2>
           	<p>请您在补交全款时或已付全款需提货时，将此小票交付商家（家具厂家直供区除外），以此确认您已支付，切勿丢失，订购商品享受的服务条款以订单为准。
线上专享区商品为限时限量抢购商品，每款商品同一手机号同一地址只限购买一次。家具厂家直供区购买的产品，如需补交全款请致电：4008-168-333。拼购商品、限时限量商品及家用电器不参加保价。</p>
        </div>
        
        <div class="foot">
            <p align="center" calss="tel">服务电话：4008-168-333</p>
            <p align="center" class="url">www.hrbjjhh.com</p>
        </div>
    </div>
	<form autocomplete="off">
		<input type="hidden" value="{:I('order_id')}" name="order_id" >
		<input type="hidden" value="{:I('paper_order')}" name="paper_order" >
		<input type="hidden" value="{:I('bind_activity_id')}" name="bind_activity_id" >
    </form>

<script>
var index = 0;
function call_back(data){
	window.opener.location.reload();
	window.close();
}
setTimeout(function(){
	dialog({
		"fixed": true,
		"width": 320,
		"title": "提示",
		"content": "您是否已经打印完毕?",
		"okValue": "打印成功",
		"ok": function(){
			if(index == 0){
				index = 1;
				$.post("{:U('Order/paperOrderBindingOrder')}", $('form').serialize(), call_back, "json");
			}
			return false;
		},
		"cancelValue": "打印失败",
		"cancel": function(){
			var d_confirm = dialog({
			    "width": 240,
			    "title": "提示",
			    "content": "是否确认打印失败？",
			    "ok": function(){
					window.close();
			    }, 
			    "okValue": "确定",
			    "cancelValue": "取消",
			    "cancel": function(){}
			}).showModal();
			return false;
		}
	}).showModal();
	$('[i-id=cancel]').attr('style','margin-right:150px;')
}, 1000);

$("#j-pager").printArea();
</script>
</body>
</html>